package com.csdig.cms.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.csdig.cms.dao.CmsSettingDAO;
import com.csdig.cms.model.CmsSetting;
import com.csdig.cms.service.SettingService;

@Service
@Transactional
public class SettingServiceImpl implements SettingService {

	@Autowired
	private CmsSettingDAO settingDao;

	@Override
	public List<CmsSetting> findAll() throws Exception {
		return settingDao.listAll();
	}

	@Override
	public void update(CmsSetting setting) throws Exception {
		settingDao.update(setting);
	}

	@Override
	public void add(CmsSetting setting) throws Exception {
		settingDao.add(setting);
	}

	@Override
	public List<CmsSetting> findAllFromCache() throws Exception {
		return settingDao.findAllFromCache();
	}

	@Override
	public void del(String name) throws Exception {
		settingDao.delete(name);
	}
	
	

}
